package com.dpac.custom.model;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.dpac.core.vo.BaseVo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * TCustomerInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_customer_info")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler", "fieldHandler" })
public class TCustomerInfo extends BaseVo implements java.io.Serializable {

	// Fields

	private Long id;
	private String idCard;
	private String idType;
	private String age;
	private String gender;
	private String cellphoneNumber;
	private String fixedPhone;
	private String email;
	private String name;
	private String address;
	private String imageUrlBig;
	private String imageUrlSmall;
	private String isDelete;
	private String createNumber;
	private String createTime;
	private String modifyNumber;
	private String modifyTime;
	private String deleteNumber;
	private String deleteTime;
	private Set<TCustomerAccount> TCustomerAccounts = new HashSet<TCustomerAccount>(0);

	// Constructors

	/** default constructor */
	public TCustomerInfo() {}

	/** minimal constructor */
	public TCustomerInfo(String isDelete, String createTime) {
		this.isDelete = isDelete;
		this.createTime = createTime;
	}

	/** full constructor */
	public TCustomerInfo(String idCard, String idType, String age, String gender, String cellphoneNumber, String fixedPhone, String email, String name, String address, String imageUrlBig,
			String imageUrlSmall, String isDelete, String createNumber, String createTime, String modifyNumber, String modifyTime, String deleteNumber, String deleteTime,
			Set<TCustomerAccount> TCustomerAccounts) {
		this.idCard = idCard;
		this.idType = idType;
		this.age = age;
		this.gender = gender;
		this.cellphoneNumber = cellphoneNumber;
		this.fixedPhone = fixedPhone;
		this.email = email;
		this.name = name;
		this.address = address;
		this.imageUrlBig = imageUrlBig;
		this.imageUrlSmall = imageUrlSmall;
		this.isDelete = isDelete;
		this.createNumber = createNumber;
		this.createTime = createTime;
		this.modifyNumber = modifyNumber;
		this.modifyTime = modifyTime;
		this.deleteNumber = deleteNumber;
		this.deleteTime = deleteTime;
		this.TCustomerAccounts = TCustomerAccounts;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "id_card", length = 18)

	public String getIdCard() {
		return this.idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	@Column(name = "id_type", length = 1)

	public String getIdType() {
		return this.idType;
	}

	public void setIdType(String idType) {
		this.idType = idType;
	}

	@Column(name = "age", length = 10)

	public String getAge() {
		return this.age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	@Column(name = "gender", length = 1)

	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	@Column(name = "cellphone_number", length = 20)

	public String getCellphoneNumber() {
		return this.cellphoneNumber;
	}

	public void setCellphoneNumber(String cellphoneNumber) {
		this.cellphoneNumber = cellphoneNumber;
	}

	@Column(name = "fixed_phone", length = 20)

	public String getFixedPhone() {
		return this.fixedPhone;
	}

	public void setFixedPhone(String fixedPhone) {
		this.fixedPhone = fixedPhone;
	}

	@Column(name = "email", length = 50)

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "name", length = 20)

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "address", length = 200)

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "image_url_big", length = 200)

	public String getImageUrlBig() {
		return this.imageUrlBig;
	}

	public void setImageUrlBig(String imageUrlBig) {
		this.imageUrlBig = imageUrlBig;
	}

	@Column(name = "image_url_small", length = 200)

	public String getImageUrlSmall() {
		return this.imageUrlSmall;
	}

	public void setImageUrlSmall(String imageUrlSmall) {
		this.imageUrlSmall = imageUrlSmall;
	}

	@Column(name = "is_delete", nullable = false, length = 1)

	public String getIsDelete() {
		return this.isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	@Column(name = "create_number", length = 20)

	public String getCreateNumber() {
		return this.createNumber;
	}

	public void setCreateNumber(String createNumber) {
		this.createNumber = createNumber;
	}

	@Column(name = "create_time", nullable = false, length = 20)

	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	@Column(name = "modify_number", length = 20)

	public String getModifyNumber() {
		return this.modifyNumber;
	}

	public void setModifyNumber(String modifyNumber) {
		this.modifyNumber = modifyNumber;
	}

	@Column(name = "modify_time", length = 20)

	public String getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(String modifyTime) {
		this.modifyTime = modifyTime;
	}

	@Column(name = "delete_number", length = 20)

	public String getDeleteNumber() {
		return this.deleteNumber;
	}

	public void setDeleteNumber(String deleteNumber) {
		this.deleteNumber = deleteNumber;
	}

	@Column(name = "delete_time", length = 20)

	public String getDeleteTime() {
		return this.deleteTime;
	}

	public void setDeleteTime(String deleteTime) {
		this.deleteTime = deleteTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TCustomerInfo")
	@JsonIgnore
	public Set<TCustomerAccount> getTCustomerAccounts() {
		return this.TCustomerAccounts;
	}

	public void setTCustomerAccounts(Set<TCustomerAccount> TCustomerAccounts) {
		this.TCustomerAccounts = TCustomerAccounts;
	}

}